In a computing device, such as a server, router, desktop computer, laptop, etc., and other devices having processor logic and memory, the device includes an operating system and a number of application programs that execute on the computing device. The operating system layer includes a “kernel”. The kernel is a master control program that runs the computing device. The kernel provides functions such as task, device, and data management, among others. The application layer includes application programs that perform particular tasks. These programs can typically be added by a user or administrator as options to a computer device. Application programs are executable instructions, which are located above the operating system layer and accessible by a user.
The application layer and other user accessible layers are often referred to as being in “user space”, while the operating system layer can be referred to as “kernel space”. As used herein, “user space” implies a layer of code which is more easily accessible to a user or administrator than the layer of code which is in the operating system layer or “kernel space”.
In an operating system parlance, the kernel is the set of modules forming the core of the operating system. The kernel is loaded into main memory first on startup of a computer and remains in main memory providing services such as memory management, process and task management, and disk management. The kernel also handles such issues as startup and initialization of the computer system. Logically, a kernel configuration is a collection of all the administrator choices and settings needed to determine the behavior and capabilities of the kernel. This collection includes a set of kernel modules (each with a desired state), a set of kernel tunable parameter value assignments, a primary swap device, a set of dump device specifications, a set of bindings of devices to other device drivers, a name and optional description of the kernel configuration, etc.
System users, e.g., system administrators may make changes to a running kernel configuration that will not take effect until a next system boot and may save kernel configurations to be selected for a later boot. When a system user wants to shutdown a computing device and/or computing system a shutdown routine can be called either via a shutdown command (e.g., an orderly shutdown) or the reboot command (e.g., a quick, abrupt shutdown). Previously, shutdown routines called through a shutdown command would move a selected or marked new kernel configuration into place during shutdown, but shutdown routines called through a reboot command would not. That is, the shutdown routine associated with the reboot command did not handle saved configurations, kernel registry service (KRS) databases, titles, etc. For reboot, the system user had to manually move the new desired kernel configuration into place prior to reboot.
Another issue with various kernel configurations involves crash dumps. When a kernel configuration gets into a bad error state, e.g., panic state, from which it is unable to recover, it is said to have crashed. At this point several utilities try to save the kernel state, e.g., what programs were running and what their state was at the time of the crash, on to disk so that the problem can be investigated further. This saved kernel state information can be referred to as a crash dump. While saving the state data to a known location, the utility tools will also attempt to save a copy of the kernel configuration which caused the crash.
Current crash utility tools are unable to deterministically say which kernel configuration caused the panic. Crash utility tools typically copy a kernel configuration located at a pre-defined directory along with a crash dump. In some scenarios, a system user may have interacted with a boot prompt to boot to a kernel configuration different from the one which is present at the pre-defined directory. Hence, if a crash dump occurs while using another boot prompted kernel configuration, the system user would have to remember to manually copy this requested kernel configuration for diagnostic use since a different kernel configuration exists in the pre-defined directory and would have been copied by default. If the wrong kernel configuration is copied along with the crash dump, the results will be unreadable since a kernel id contained in the crash dump will not match the kernel configuration copied from the pre-determined directory.